//
//  CalulateManager.m
//  KVO和链式编程
//
//  Created by dihuijun on 17/4/13.
//  Copyright © 2017年 Cycle. All rights reserved.
//

#import "CalulateManager.h"

@implementation CalulateManager
/**   加法 addition */
- (__kindof CalulateManager *(^)(double))add{
    
    return ^(double value){
        _result+=value;
        return self;
    };
}
/**   减法  subtraction */
- (__kindof CalulateManager *(^)(double))sub{
    return ^(double value){
        _result-=value;
        return self;
    };
}
/**   乘法 [词典]	multiplicative */
- (__kindof CalulateManager *(^)(double))mult{
    return ^(double value){
        _result*=value;
        return self;
    };
}
/**   除法 division */
- (__kindof CalulateManager *(^)(double))divs{
    return ^(double value){
        _result/=value;
        return self;
    };
}
@end
